package cn.bon.emp.api.pojo.po;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateTimeDeserializer;
import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 * 员工信息
 * </p>
 *
 * @author luochao
 * @since 2023-12-08
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
public class EmpInfo implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 员工id
     */
    @TableId(value = "emp_id")
    @Schema(description = "员工id")
    private Long empId;

    /**
     * 员工号
     */
    @Schema(description = "员工号")
    private String empNumber;

    /**
     * 员工姓名
     */
    @Schema(description = "姓名")
    private String empName;

    /**
     * 岗位id
     */
    @Schema(description = "岗位")
    private Long empJobId;

    /**
     * 电话号
     */
    @Schema(description = "电话号")
    private String empPhone;


    /**
     * 邮箱
     */
    @Schema(description = "邮箱")
    private String empMail;
    /**
     * 任务安排
     */
    @Schema(description = "任务")
    private String empTask;

    /**
     *  0未备勤, 1备勤
     */
    @Schema(description = "不传参默认全部  筛选状态: 0未备勤, 1备勤")
    private Integer status = 0;

    /**
     * 创建时间
     */
    @JsonIgnore
    @TableField(fill = FieldFill.INSERT)
    @JsonDeserialize(using = LocalDateTimeDeserializer.class)		// 反序列化
    @JsonSerialize(using = LocalDateTimeSerializer.class)		// 序列化
    private LocalDateTime createTime;

    /**
     * 修改时间
     */
    @Schema(description = "更新时间")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    @JsonDeserialize(using = LocalDateTimeDeserializer.class)		// 反序列化
    @JsonSerialize(using = LocalDateTimeSerializer.class)		// 序列化
    private LocalDateTime updateTime;

    /**
     * 删除标志位
     */
    @JsonIgnore
    private Integer delFlag = 0;



}
